<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Integrator &mdash; SIMULATeQCD 0.7 documentation</title>
      <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
      <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
      <link rel="stylesheet" href="../_static/togglebutton.css" type="text/css" />
      <link rel="stylesheet" href="../_static/custom.css" type="text/css" />
  <!--[if lt IE 9]>
    <script src="../_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
        <script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
        <script src="../_static/jquery.js"></script>
        <script src="../_static/underscore.js"></script>
        <script src="../_static/doctools.js"></script>
        <script src="../_static/togglebutton.js"></script>
        <script>var togglebuttonSelector = '.toggle, .admonition.dropdown';</script>
        <script async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
        <script>window.MathJax = {"options": {"processHtmlClass": "tex2jax_process|mathjax_process|math|output_area"}}</script>
    <script src="../_static/js/theme.js"></script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="Random Number Generator" href="randomNumbers.html" />
    <link rel="prev" title="Dslash" href="dslash.html" /> 
</head>

<body class="wy-body-for-nav"> 
  <div class="wy-grid-for-nav">
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search"  style="background: #343131" >
            <a href="../index.html" class="icon icon-home"> SIMULATeQCD
          </a>
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>
        </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../01_gettingStarted/gettingStarted.html">Getting started</a></li>
<li class="toctree-l1"><a class="reference internal" href="../02_contributions/contributions.html">Contributions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../03_applications/applications.html">Applications</a></li>
<li class="toctree-l1"><a class="reference internal" href="../04_codeBase/codeBase.html">Code base</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="modules.html">Modules</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="inverter.html">Inverter (Conjugate Gradient)</a></li>
<li class="toctree-l2"><a class="reference internal" href="correlator.html">Correlator Class</a></li>
<li class="toctree-l2"><a class="reference internal" href="gaugeUpdates.html">Gauge Updates (HB and OR)</a></li>
<li class="toctree-l2"><a class="reference internal" href="dslash.html">Dslash</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Integrator</a></li>
<li class="toctree-l2"><a class="reference internal" href="randomNumbers.html">Random Number Generator</a></li>
<li class="toctree-l2"><a class="reference internal" href="gaugeSmearing.html">HISQ smearing</a></li>
</ul>
</li>
</ul>

        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu"  style="background: #343131" >
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../index.html">SIMULATeQCD</a>
      </nav>

      <div class="wy-nav-content">
        <div class="rst-content">
          <div role="navigation" aria-label="Page navigation">
  <ul class="wy-breadcrumbs">
      <li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
          <li><a href="modules.html">Modules</a> &raquo;</li>
      <li>Integrator</li>
      <li class="wy-breadcrumbs-aside">
            <a href="../_sources/05_modules/integrator.md.txt" rel="nofollow"> View page source</a>
      </li>
  </ul>
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
             
  <section class="tex2jax_ignore mathjax_ignore" id="integrator">
<h1>Integrator<a class="headerlink" href="#integrator" title="Permalink to this headline"></a></h1>
<p>This class takes care of the symplectic integration of the molecular dynamics trajectory. An object of this type is instantiated in the constructor of the rhmc class. And the MD evolution is done by the <code class="docutils literal notranslate"><span class="pre">integrate</span></code> function. There is the possibility of several different integration schemes. At the moment there are only two schemes: Purge gauge Leapfrog and a <a class="reference external" href="https://www.sciencedirect.com/science/article/pii/055032139290263B?via%3Dihub">Sexton-Weingarten</a> integrator with different time steps for
gauge, heavy fermion and light fermion parts of the force. The Sexton-Weingarten integrator uses the <a class="reference external" href="https://www.sciencedirect.com/science/article/pii/S0370269301011029?via%3Dihub">Hasenbusch</a> trick.</p>
<p>The constructor has to be called with the usual template arguments and one has to pass several arguments:</p>
<div class="highlight-C++ notranslate"><div class="highlight"><pre><span></span><span class="n">integrator</span><span class="p">(</span><span class="n">RhmcParameters</span><span class="w"> </span><span class="n">rhmc_param</span><span class="p">,</span><span class="w"> </span><span class="n">Gaugefield</span><span class="o">&lt;</span><span class="n">floatT</span><span class="p">,</span><span class="n">onDevice</span><span class="p">,</span><span class="n">All</span><span class="p">,</span><span class="n">HaloDepth</span><span class="o">&gt;</span><span class="w"> </span><span class="o">&amp;</span><span class="n">gaugeField</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">Gaugefield</span><span class="o">&lt;</span><span class="n">floatT</span><span class="p">,</span><span class="n">onDevice</span><span class="p">,</span><span class="n">All</span><span class="p">,</span><span class="n">HaloDepth</span><span class="o">&gt;</span><span class="w"> </span><span class="o">&amp;</span><span class="n">p</span><span class="p">,</span><span class="w"> </span><span class="n">Gaugefield</span><span class="o">&lt;</span><span class="n">floatT</span><span class="p">,</span><span class="n">onDevice</span><span class="p">,</span><span class="n">All</span><span class="p">,</span><span class="n">HaloDepth</span><span class="o">&gt;</span><span class="w"> </span><span class="o">&amp;</span><span class="n">X</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">CG</span><span class="o">&lt;</span><span class="n">floatT</span><span class="p">,</span><span class="w"> </span><span class="n">onDevice</span><span class="p">,</span><span class="w"> </span><span class="n">HaloDepth</span><span class="o">&gt;</span><span class="w"> </span><span class="o">&amp;</span><span class="n">cg</span><span class="p">,</span><span class="w"> </span><span class="n">DSlash</span><span class="o">&lt;</span><span class="n">floatT</span><span class="p">,</span><span class="w"> </span><span class="n">onDevice</span><span class="p">,</span><span class="w"> </span><span class="n">HaloDepth</span><span class="o">&gt;</span><span class="w"> </span><span class="o">&amp;</span><span class="n">dslash</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">floatT</span><span class="o">&gt;</span><span class="w"> </span><span class="o">&amp;</span><span class="n">rat1f</span><span class="p">,</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">floatT</span><span class="o">&gt;</span><span class="w"> </span><span class="o">&amp;</span><span class="n">rat2f</span><span class="p">)</span><span class="w"></span>
</pre></div>
</div>
<p>Aruments are: A <code class="docutils literal notranslate"><span class="pre">RhmcParameters</span></code> instance, the gauge field, a conjugate momentum field, two smeared gauge fields, a CG instance, an instance of a dslash and two vectors containing the coefficients for the rational approximations needed in the fermion force.</p>
<section id="integrator-integrate">
<h2>Integrator.integrate<a class="headerlink" href="#integrator-integrate" title="Permalink to this headline"></a></h2>
<div class="highlight-C++ notranslate"><div class="highlight"><pre><span></span><span class="kt">void</span><span class="w"> </span><span class="n">integrator</span><span class="o">&lt;</span><span class="n">floatT</span><span class="p">,</span><span class="w"> </span><span class="n">onDevice</span><span class="p">,</span><span class="w"> </span><span class="n">LatticeLayout</span><span class="p">,</span><span class="w"> </span><span class="n">HaloDepth</span><span class="p">,</span><span class="w"> </span><span class="n">HaloDepthSpin</span><span class="o">&gt;::</span><span class="n">integrate</span><span class="p">(</span><span class="w"></span>
<span class="w">    </span><span class="n">Spinorfield_container</span><span class="o">&lt;</span><span class="n">floatT</span><span class="p">,</span><span class="w"> </span><span class="n">onDevice</span><span class="p">,</span><span class="w"> </span><span class="n">Even</span><span class="p">,</span><span class="w"> </span><span class="n">HaloDepthSpin</span><span class="o">&gt;</span><span class="w"> </span><span class="o">&amp;</span><span class="n">_phi_lf</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">Spinorfield_container</span><span class="o">&lt;</span><span class="n">floatT</span><span class="p">,</span><span class="w"> </span><span class="n">onDevice</span><span class="p">,</span><span class="w"> </span><span class="n">Even</span><span class="p">,</span><span class="w"> </span><span class="n">HaloDepthSpin</span><span class="o">&gt;</span><span class="w"> </span><span class="o">&amp;</span><span class="n">_phi_sf</span><span class="p">)</span><span class="w"></span>
</pre></div>
</div>
<p><code class="docutils literal notranslate"><span class="pre">integrator.integrate</span></code> requires two <code class="docutils literal notranslate"><span class="pre">Spinorfield_container</span></code>s, a class that deals with <code class="docutils literal notranslate"><span class="pre">std::vector&lt;Spinorfield&gt;</span></code>.</p>
</section>
<section id="force-filters">
<h2>Force filters<a class="headerlink" href="#force-filters" title="Permalink to this headline"></a></h2>
<p>Sometimes during the force calculation, you have on some links gauge fields
with near zero eigenvalues, and you get gigantic force term, because this turns out
to be proportional to the inverse eigenvalue. To prevent local force spikes, this code
demands an eigenvalue cutoff less than <span class="math notranslate nohighlight">\(\delta=5\times10^{-5}\)</span>. If the force filter is
applied too much, this can lower the acceptance rate.</p>
</section>
</section>


           </div>
          </div>
          <footer>

  <hr/>

  <div role="contentinfo">
    <p>&#169; Copyright 2021, LatticeQCD.</p>
  </div>

  Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
    <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
    provided by <a href="https://readthedocs.org">Read the Docs</a>.
   

</footer>
        </div>
      </div>
    </section>
  </div>
  <script>
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script> 

</body>
</html>